3.18 \(\int (a+b \tanh ^{-1}(c x))^2 \, dx\)

Optimal. Leaf size=74 \[ -\frac{b^2 \text{PolyLog}\left (2,1-\frac{2}{1-c x}\right )}{c}+x \left (a+b \tanh ^{-1}(c x)\right )^2+\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{c}-\frac{2 b \log \left (\frac{2}{1-c x}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{c} \]

[Out]

(a + b*ArcTanh[c*x])^2/c + x*(a + b*ArcTanh[c*x])^2 - (2*b*(a + b*ArcTanh[c*x])*Log[2/(1 - c*x)])/c - (b^2*Pol
yLog[2, 1 - 2/(1 - c*x)])/c

________________________________________________________________________________________

Rubi [A]  time = 0.101124, antiderivative size = 74, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, Rules used = {5910, 5984, 5918, 2402, 2315} \[ -\frac{b^2 \text{PolyLog}\left (2,1-\frac{2}{1-c x}\right )}{c}+x \left (a+b \tanh ^{-1}(c x)\right )^2+\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{c}-\frac{2 b \log \left (\frac{2}{1-c x}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{c} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*ArcTanh[c*x])^2,x]

[Out]

(a + b*ArcTanh[c*x])^2/c + x*(a + b*ArcTanh[c*x])^2 - (2*b*(a + b*ArcTanh[c*x])*Log[2/(1 - c*x)])/c - (b^2*Pol
yLog[2, 1 - 2/(1 - c*x)])/c

Rule 5910

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*ArcTanh[c*x])^p, x] - Dist[b*c*p, In
t[(x*(a + b*ArcTanh[c*x])^(p - 1))/(1 - c^2*x^2), x], x] /; FreeQ[{a, b, c}, x] && IGtQ[p, 0]

Rule 5984

Int[(((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)*(x_))/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(a + b*ArcTanh[c
*x])^(p + 1)/(b*e*(p + 1)), x] + Dist[1/(c*d), Int[(a + b*ArcTanh[c*x])^p/(1 - c*x), x], x] /; FreeQ[{a, b, c,
 d, e}, x] && EqQ[c^2*d + e, 0] && IGtQ[p, 0]

Rule 5918

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[((a + b*ArcTanh[c*x])^p*
Log[2/(1 + (e*x)/d)])/e, x] + Dist[(b*c*p)/e, Int[((a + b*ArcTanh[c*x])^(p - 1)*Log[2/(1 + (e*x)/d)])/(1 - c^2
*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[c^2*d^2 - e^2, 0]

Rule 2402

Int[Log[(c_.)/((d_) + (e_.)*(x_))]/((f_) + (g_.)*(x_)^2), x_Symbol] :> -Dist[e/g, Subst[Int[Log[2*d*x]/(1 - 2*
d*x), x], x, 1/(d + e*x)], x] /; FreeQ[{c, d, e, f, g}, x] && EqQ[c, 2*d] && EqQ[e^2*f + d^2*g, 0]

Rule 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rubi steps

\begin{align*} \int \left (a+b \tanh ^{-1}(c x)\right )^2 \, dx &=x \left (a+b \tanh ^{-1}(c x)\right )^2-(2 b c) \int \frac{x \left (a+b \tanh ^{-1}(c x)\right )}{1-c^2 x^2} \, dx\\ &=\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{c}+x \left (a+b \tanh ^{-1}(c x)\right )^2-(2 b) \int \frac{a+b \tanh ^{-1}(c x)}{1-c x} \, dx\\ &=\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{c}+x \left (a+b \tanh ^{-1}(c x)\right )^2-\frac{2 b \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac{2}{1-c x}\right )}{c}+\left (2 b^2\right ) \int \frac{\log \left (\frac{2}{1-c x}\right )}{1-c^2 x^2} \, dx\\ &=\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{c}+x \left (a+b \tanh ^{-1}(c x)\right )^2-\frac{2 b \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac{2}{1-c x}\right )}{c}-\frac{\left (2 b^2\right ) \operatorname{Subst}\left (\int \frac{\log (2 x)}{1-2 x} \, dx,x,\frac{1}{1-c x}\right )}{c}\\ &=\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{c}+x \left (a+b \tanh ^{-1}(c x)\right )^2-\frac{2 b \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac{2}{1-c x}\right )}{c}-\frac{b^2 \text{Li}_2\left (1-\frac{2}{1-c x}\right )}{c}\\ \end{align*}

Mathematica [A]  time = 0.142661, size = 82, normalized size = 1.11 \[ \frac{b^2 \text{PolyLog}\left (2,-e^{-2 \tanh ^{-1}(c x)}\right )+a \left (a c x+b \log \left (1-c^2 x^2\right )\right )+2 b \tanh ^{-1}(c x) \left (a c x-b \log \left (e^{-2 \tanh ^{-1}(c x)}+1\right )\right )+b^2 (c x-1) \tanh ^{-1}(c x)^2}{c} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[(a + b*ArcTanh[c*x])^2,x]

[Out]

(b^2*(-1 + c*x)*ArcTanh[c*x]^2 + 2*b*ArcTanh[c*x]*(a*c*x - b*Log[1 + E^(-2*ArcTanh[c*x])]) + a*(a*c*x + b*Log[
1 - c^2*x^2]) + b^2*PolyLog[2, -E^(-2*ArcTanh[c*x])])/c

________________________________________________________________________________________

Maple [A]  time = 0.049, size = 123, normalized size = 1.7 \begin{align*} x{b}^{2} \left ({\it Artanh} \left ( cx \right ) \right ) ^{2}+2\,xab{\it Artanh} \left ( cx \right ) +{\frac{{b}^{2} \left ({\it Artanh} \left ( cx \right ) \right ) ^{2}}{c}}-2\,{\frac{{\it Artanh} \left ( cx \right ){b}^{2}}{c}\ln \left ({\frac{ \left ( cx+1 \right ) ^{2}}{-{c}^{2}{x}^{2}+1}}+1 \right ) }+{a}^{2}x-{\frac{{b}^{2}}{c}{\it polylog} \left ( 2,-{\frac{ \left ( cx+1 \right ) ^{2}}{-{c}^{2}{x}^{2}+1}} \right ) }+{\frac{ab\ln \left ( -{c}^{2}{x}^{2}+1 \right ) }{c}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*arctanh(c*x))^2,x)

[Out]

x*b^2*arctanh(c*x)^2+2*x*a*b*arctanh(c*x)+1/c*b^2*arctanh(c*x)^2-2/c*arctanh(c*x)*ln((c*x+1)^2/(-c^2*x^2+1)+1)
*b^2+a^2*x-1/c*polylog(2,-(c*x+1)^2/(-c^2*x^2+1))*b^2+1/c*a*b*ln(-c^2*x^2+1)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} -\frac{1}{4} \,{\left (c^{2}{\left (\frac{2 \, x}{c^{2}} - \frac{\log \left (c x + 1\right )}{c^{3}} + \frac{\log \left (c x - 1\right )}{c^{3}}\right )} - 6 \, c \int \frac{x \log \left (c x + 1\right )}{c^{2} x^{2} - 1}\,{d x} - \frac{{\left (c x - 1\right )}{\left (\log \left (-c x + 1\right )^{2} - 2 \, \log \left (-c x + 1\right ) + 2\right )}}{c} - \frac{c x \log \left (c x + 1\right )^{2} + 2 \,{\left (c x -{\left (c x + 1\right )} \log \left (c x + 1\right )\right )} \log \left (-c x + 1\right )}{c} + \frac{\log \left (c^{2} x^{2} - 1\right )}{c} - 2 \, \int \frac{\log \left (c x + 1\right )}{c^{2} x^{2} - 1}\,{d x}\right )} b^{2} + a^{2} x + \frac{{\left (2 \, c x \operatorname{artanh}\left (c x\right ) + \log \left (-c^{2} x^{2} + 1\right )\right )} a b}{c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x))^2,x, algorithm="maxima")

[Out]

-1/4*(c^2*(2*x/c^2 - log(c*x + 1)/c^3 + log(c*x - 1)/c^3) - 6*c*integrate(x*log(c*x + 1)/(c^2*x^2 - 1), x) - (
c*x - 1)*(log(-c*x + 1)^2 - 2*log(-c*x + 1) + 2)/c - (c*x*log(c*x + 1)^2 + 2*(c*x - (c*x + 1)*log(c*x + 1))*lo
g(-c*x + 1))/c + log(c^2*x^2 - 1)/c - 2*integrate(log(c*x + 1)/(c^2*x^2 - 1), x))*b^2 + a^2*x + (2*c*x*arctanh
(c*x) + log(-c^2*x^2 + 1))*a*b/c

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (b^{2} \operatorname{artanh}\left (c x\right )^{2} + 2 \, a b \operatorname{artanh}\left (c x\right ) + a^{2}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x))^2,x, algorithm="fricas")

[Out]

integral(b^2*arctanh(c*x)^2 + 2*a*b*arctanh(c*x) + a^2, x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \operatorname{atanh}{\left (c x \right )}\right )^{2}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*atanh(c*x))**2,x)

[Out]

Integral((a + b*atanh(c*x))**2, x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \operatorname{artanh}\left (c x\right ) + a\right )}^{2}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x))^2,x, algorithm="giac")

[Out]

integrate((b*arctanh(c*x) + a)^2, x)